<template>
  <div class="text-right">
    <el-row class="title">学科试题数量排名</el-row>
    <el-row v-for="item in list" :key="item.id" type="flex" justify="space-between" class="line">
      <el-col :span="4">
        <span v-if="item.id===1||item.id===2||item.id===3" class="item">{{ item.id }}</span>
        <span v-else class="item hot">{{ item.id }}</span>
      </el-col>
      <el-col :span="16" class="text">{{ item.title }}</el-col>
      <el-col :span="4" class="text">{{ item.num }}</el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  name: '',
  components: {},
  props: {},
  data() {
    return {
      list: [
        {
          id: 1,
          title: '前端',
          num: '5,234'
        },
        {
          id: 2,
          title: 'java',
          num: '3,210'
        },
        {
          id: 3,
          title: '大数据',
          num: '1,294'
        },
        {
          id: 4,
          title: 'C++',
          num: '1,001'
        },
        {
          id: 5,
          title: 'UI',
          num: '934'
        },
        {
          id: 6,
          title: 'php',
          num: '856'
        },
        {
          id: 7,
          title: 'python',
          num: '403'
        },
        {
          id: 8,
          title: '测试',
          num: '122'
        }
      ]
    }
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {},
  methods: {}
}
</script>
<style lang='scss' scoped>
.text-right {
  padding: 20px;
  width: 400px;
  .line {
    margin-bottom: 15px;
  }
  .item {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: #314659;
    color: #fff;
    text-align: center;
    font-size: 12px;
    line-height: 20px;
    font-weight: 600;
    border-radius: 50%;
  }
  .hot {
    background: #ccc;
  }
  .text {
    color: #696969;
    text-align: left;
  }
  .title {
    margin-bottom: 20px;
    color: #666;
    font-size: 17px;
  }
}
</style>
